import React from 'react'
import Mysort from './Mysort'
interface Props {
    
}
class Baseclass{
  name:string;
  age:number;
  constructor(name:string,age:number){
    this.name=name;
    this.age=age
  }
}
class Child extends Baseclass{
  constructor(name:string,age:number){
    super(name,age)
  }
  eat():string{
    return this.name+'很能吃'
  }
}
const App = (props: Props) => {
  var stu=new Child('张三',20)
  console.log(stu,44444);
  console.log(stu.eat());
  
 var arr=[1,2,3,4];
 var sum=arr.reduce((i,j)=>{
  return i+j
 })
 console.log(sum,111111111);
 var newArr=[1,2,9,3,7];
//  var getMaxDiff=(arr:number[]):number=>{
  var max:number=Math.max(...newArr);
  var min:number=Math.min(...newArr)
//   return max-min
//  }
 console.log("最大差值:" + (max-min));
 
    return (

        <div>
          这是根目录App.js
          <Mysort></Mysort>
        </div>
    )
}

export default App
